package com.ye.personnel.api.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

import java.util.stream.Stream;

/**
 * @Author: yeubo
 * @Date: 2024/1/2 17:13
 */
@AllArgsConstructor
@NoArgsConstructor
@Getter
public enum ManageTypeEnum {

    ZY("01","中央管理干部"),
    SJ("02","省级党委管理干部"),
    SI("03","市级党委管理干部"),
    XJ("04","县级党委管理干部"),
    QT("09","其他");

    public String type;
    public String name;

    public static String getName(String type){
        ManageTypeEnum userTypeEnum = Stream.of(values())
                .filter(t -> t.type.equals(type))
                .findFirst()
                .orElse(QT);
        return userTypeEnum.getName();
    }
}
